<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		//输入身高体重
		<h1>bmi计算</h1>
		<div >
			身高<input type="text"  id="input1"  /><br>
			体重<input type="text" id="input2"  /><br>
			bmi<input type="text" id="input3"  /><br>
			<button onclick="cal()">计算</button>
		</div>
		<script type="text/javascript">
			function cal()
			{
			var input1 = document.getElementById("input1");
			var shengao =Input1.value;
			var input2 = document.getElementById("input2");
			var tizhong =Input2.value;
			var bmi = tizhong/shengao*shengao;
			var input3 = document.getElementById("input3");
			input3.value =bim
				
			}
		</script>
	</body>
</html>
